﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using webnew.DAL;
using System.Data;
namespace webnew.BLL
{
    public class Sys_RoleNavigation
    {
        DAL.Sys_RoleNavigationHelper dal = new webnew.DAL.Sys_RoleNavigationHelper();

        public int RoleSet(string roleID, string[] Navigations)
        {
            new DAL.Sys_RoleNavigationHelper().Add(roleID, Navigations);
            return 1;
        }
        /// <summary>
        /// 根据角色id获取角色导航列表
        /// </summary>
        /// <param name="RoleID">角色ID</param>
        /// <returns></returns>
        public DataTable GetRoleNavigation(string RoleID)
        {

            return new DAL.Sys_RoleNavigationHelper().GetRoleNavigation(RoleID);
        }

        /// <summary>
        /// 根据多个角色id获取角色导航列表
        /// </summary>
        /// <param name="RoleID">角色ID</param>
        /// <returns></returns>
        public DataTable GetRoleListNavigation(List<Model.Sys_UserRoleInfo> lstRole)
        {
            return dal.GetRoleListNavigation(lstRole);
        }

        /// <summary>
        /// 根据用户id获取角色导航列表
        /// </summary>
        /// <param name="RoleID">角色ID</param>
        /// <returns></returns>
        public DataTable GetUserNavigation(string UserID)
        {
            return dal.GetUserNavigation(UserID);
        }
    }
}